<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Post extends Model
{
    use HasFactory;

    protected $fillable = ['title','cover','type_id','pan','price','points','sort','clicks','status','content','tag'];

    const POSTONLY = ['title','cover','type_id','pan','price','points','sort','clicks','status','content','tag'];

    public function type()
    {
        return $this->hasOne(Type::class,'id','type_id');
    }
}
